package com.msa.msaportal.service.impl;

import java.util.List;


import com.msa.msaportal.common.page.Pagination;
import com.msa.msaportal.dao.IPortalRoleDao;
import com.msa.msaportal.entity.PortalFunction;
import com.msa.msaportal.entity.PortalRole;
import com.msa.msaportal.service.IPortalRoleService;

public class PortalRoleServiceImpl implements IPortalRoleService {
	
	private IPortalRoleDao portalRoleDao;

	public IPortalRoleDao getPortalRoleDao() {
		return portalRoleDao;
	}

	public void setPortalRoleDao(IPortalRoleDao portalRoleDao) {
		this.portalRoleDao = portalRoleDao;
	}

	@Override
	public void saveRole(PortalRole portalRole) {

		portalRoleDao.saveRole(portalRole);
	}
	@Override
	public List<PortalRole> getRolelist() {
		// TODO Auto-generated method stub
		return portalRoleDao.getRolelist();
	}

	@Override
	public List<PortalFunction> getfunctionlist() {
		// TODO Auto-generated method stub
		return portalRoleDao.getFunctionlist();
	}

	@Override
	public PortalFunction findByid(Integer functionId) {
		// TODO Auto-generated method stub
		return portalRoleDao.findById(functionId);
	}

	@Override
	public PortalRole findById(Integer roleId) {
		// TODO Auto-generated method stub
		return portalRoleDao.findObjById(roleId);
	}

	@Override
	public void updateRole(PortalRole portalRole) {
		// TODO Auto-generated method stub
		portalRoleDao.updateRole(portalRole);
	}

	@Override
	public void deleteRole(PortalRole portalRole) {
		// TODO Auto-generated method stub
		portalRoleDao.deleteRole(portalRole);
	}

	@Override
	public List<PortalRole> findRoleListByattr(String roleName) {
		// TODO Auto-generated method stub
		return portalRoleDao.findRoleByattr(roleName);
	}

	@Override
	public Pagination getRole(String role_name, int pageNo, int pageSize) {
		// TODO Auto-generated method stub
		return portalRoleDao.findRolepage(role_name, pageNo, pageSize);
	}
	


}
